//package com.platform.lisitener;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.redis.connection.Message;
//import org.springframework.data.redis.connection.MessageListener;
//
//@Configuration
//public class RedisListenerConfig implements MessageListener {
//    @Override
//    public void onMessage(Message message, byte[] bytes) {
//        byte[] body = message.getBody();
//        byte[] channel = message.getChannel();
//        //设置监听频道
//        String topic = new String(channel);
//        //key
//        String itemValue = new String(body);
//        System.out.println("频道topic:"+topic);
//        System.out.println("过期的键值对的K:"+itemValue);
//
//    }
//
////    @Autowired
////    private RedisTemplate
//}
